From fb6a0314fded42ceee0b85d590b224703704c00e Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Wed, 6 Jun 2007 08:29:20 +0000 Subject: [PATCH] Update comment to be more clear and print a warning if we try to create a 2007-06-06 Richard Hult * gdk/quartz/gdkevents-quartz.c (synthesize_crossing_events): Update comment to be more clear and print a warning if we try to create a crossing event without knowing what the current mouse window is, to help track down focus bugs. * gdk/quartz/gdkevents-quartz.c (_gdk_quartz_events_update_focus_window): Fix indentation. svn path=/trunk/; revision=18047 --- ChangeLog | 12 +++++++++++- gdk/quartz/gdkevents-quartz.c | 21 +++++++++------------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index c136d82838..a18aa798aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,14 @@ -2007-06-05 Richard Hult +2007-06-06 Richard Hult + + * gdk/quartz/gdkevents-quartz.c (synthesize_crossing_events): + Update comment to be more clear and print a warning if we try to + create a crossing event without knowing what the current mouse + window is, to help track down focus bugs. + + * gdk/quartz/gdkevents-quartz.c + (_gdk_quartz_events_update_focus_window): Fix indentation. + +2007-06-06 Richard Hult * gdk/quartz/GdkQuartzWindow.c: Don't let temp windows become key window. diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c index 73863a5d75..fc0335fd93 100644 --- a/gdk/quartz/gdkevents-quartz.c +++ b/gdk/quartz/gdkevents-quartz.c @@ -495,10 +495,10 @@ _gdk_quartz_events_update_focus_window (GdkWindow *window, if (!got_focus && window == current_keyboard_window) { - event = create_focus_event (current_keyboard_window, FALSE); - append_event (event); - g_object_unref (current_keyboard_window); - current_keyboard_window = NULL; + event = create_focus_event (current_keyboard_window, FALSE); + append_event (event); + g_object_unref (current_keyboard_window); + current_keyboard_window = NULL; } if (got_focus) @@ -755,15 +755,12 @@ synthesize_crossing_events (GdkWindow *window, } else { - /* This means we have not current_mouse_window. FIXME: Should - * we make sure to always set the root window instead of NULL? + /* This means we have no current_mouse_window, which probably + * means that there is a bug somewhere, we should always have + * the root in we don't have another window. Does this ever + * happen? */ - - /* FIXME: Figure out why this is being called with window being - * NULL. The check works around a crash for now. - */ - if (window) - synthesize_enter_event (window, nsevent, mode, GDK_NOTIFY_UNKNOWN); + g_warning ("Trying to create crossing event when current_mouse_window is NULL"); } _gdk_quartz_events_update_mouse_window (window); -- 2.30.2